package com.huaxin.hxmoduleworkorder.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huaxin.hxmoduleworkorder.models.InspectionTemplate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface InspectionTemplateMapper extends BaseMapper<InspectionTemplate> {
    // 示例：根据模板编码查询
    // InspectionTemplate selectByTemplateCode(@Param("code") String code);
    @Select("SELECT COUNT(*) > 0 FROM inspection_template WHERE cabinet_type = #{cabinetType} AND is_deleted = 0")
    Boolean existByCabinetType(String cabinetType);
}